Remove usages of "new" as variable name #1731
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Golangci-lint started to complain the usage of
new
as variable name: https://github.com/shipwright-io/build/actions/runs/11785633189/job/32827274452?pr=1730Running [/home/runner/golangci-lint-1.62.0-linux-amd64/golangci-lint run --path-prefix=go/src/github.com/shipwright-io/build --timeout=10m] in [/home/runner/work/build/build/go/src/github.com/shipwright-io/build] ... Error: go/src/github.com/shipwright-io/build/pkg/env/env.go:17:19: redefines-builtin-id: redefinition of the built-in function new (revive) func MergeEnvVars(new []corev1.EnvVar, into []corev1.EnvVar, overwriteValues bool) ([]corev1.EnvVar, error) { ^ Error: go/src/github.com/shipwright-io/build/pkg/volumes/volumes.go:72:65: redefines-builtin-id: redefinition of the built-in function new (revive) func MergeBuildVolumes(into []buildv1beta1.BuildStrategyVolume, new []buildv1beta1.BuildVolume) ([]buildv1beta1.BuildStrategyVolume, error) {
I am renaming those two.
Submitter Checklist
Release Notes